from DrissionPage import ChromiumPage

from DrissionPage.common import Keys


dp = ChromiumPage()

dp.get(
        'https://re.jd.com/search?keyword=%e4%ba%ac%e4%b8%9c&keywordid=172887082207&re_dcp=202m0QjIIg'
        '==&traffic_source=1004&enc=utf8&cu=true&utm_source=baidu-search&utm_medium=cpc&utm_campaign'
        '=t_262767352_baidusearch&utm_term=172887082207_0_1ab76db40ebc431eb30a77334ad0a896')

dp.ele('css:.txt').input('显卡')

dp.ele('css:.txt').input(Keys.ENTER)

next_button = dp.ele('xpath://*[@id="page"]/a[7]')

next_button.click()
